home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / windows / games / mmw31.exe / EDIT.DOC < prev    next >
Text File  |  1992-05-15  |  19KB  |  365 lines

  1.  
  2.          ***************** EDITING THE PICTURE FILE ******************
  3.  
  4.          One of the excellent fringe benefits of ASCII-VECTOR-GRAPHICS
  5.          is that you can edit the picture file directly with any  word
  6.          processor  that  has  a  standard ASCII mode (and most do) or
  7.          text editor. Borland's SIDEKICK is a good one because you can
  8.          pop it up from within The Multimedia  Workshop,  edit  files,
  9.          and view the actual picture almost simultaneously.
  10.  
  11.          As you know by now, when you create a picture, it  is  stored
  12.          as  little  bits  of  text  in a plain text file.  When MSHOW
  13.          reads  this  text  picture  file,  the  lines  of  text   are
  14.          translated into parts of the picture.
  15.  
  16.          Generally,  the code goes like this: An object is represented
  17.          by a capital letter. For instance, an R is for Rectangle, a C
  18.          is for Circle and so on. Each object letter is  the  leftmost
  19.          character on a line, and is followed by a series of integers.
  20.          (Integers are numbers with no decimal point, for those of you
  21.          who  are  not  strong  in math.) These integers represent the
  22.          location of the object and its size.
  23.  
  24.          The first number is the horizontal location of the object  on
  25.          the screen in pixels. Pixels are the  little  dots  of  light
  26.          that  make up everything in a computer picture. If the number
  27.          is zero, the object is crammed up against the  left  edge  of
  28.          the  monitor. In most video modes, 639 is the far right edge,
  29.          because there are 640 pixels across the screen, and the first
  30.          one is 0. In Hercules the right edge is  719  and  in  CGA-LO
  31.          4-color it is 319.
  32.  
  33.          The  second  number is the vertical location with 0 being the
  34.          very top.  In most modes 199 is the bottom of the screen, but
  35.          in Hercules it is 347, in EGA-HIGH it is 349, and in  VGA  it
  36.          is 479.
  37.  
  38.          Many  objects  will  also  have  other   numbers   following.
  39.          Following  this  paragraph are the specific codes used in The
  40.          Multimedia Workshop picture files.  These are all  the  codes
  41.          of which all pictures are composed.  There are no others.
  42.  
  43.          T - Followed immediately by either a  digit.   This  is  line
  44.          thickness.  If  you  see  a T3, all lines, circles, freehand,
  45.          rectangles or ellipses are drawn  in  the  thick  solid  line
  46.          style from this point until another T is encountered.
  47.              T1 - thin solid line
  48.              T3 - thick solid line
  49.              T4 - thin dotted line
  50.              T5 - thick dotted line
  51.              T6 - thin dashed line
  52.              T7 - thick dashed line
  53.  
  54.          S  -  Followed  by  a  space  and an integer representing the
  55.          frequency in Hertz (cycles per second), then  another  space,
  56.          and  another  integer,  representing  the  length  of time in
  57.          milliseconds for which this sound will play. If the frequency
  58.          following S is 0, the sound is silent, as in a musical rest.
  59.  
  60.          U  -  With  nothing  following.   This  is Wait For User, and
  61.          freezes the system until the user presses any key. (Remember,
  62.          Wait For User, Delay and Sound effects will not play true  to
  63.          form  from  within  The  Multimedia  Workshop  if  "BLOW  OFF
  64.          DELAYS" has been selected from the DOOR option, but they will
  65.          be effective when run from MSHOW.EXE.
  66.  
  67.          P  -  Followed  by two integers is for Pixel, and changes the
  68.          pixel at the designated location (by the first two  integers)
  69.          to the current color.
  70.  
  71.          L  -  Followed  by four integers. This is LINE and displays a
  72.          line starting at the location  specified  by  the  first  two
  73.          numbers  and ending at the location specified by the last two
  74.          numbers. Like all objects this line will be  in  the  current
  75.          thickness and color.
  76.  
  77.          Z - Followed by six integers.  This specifies a ZOOM  action.
  78.          The  first  four  integers  represent the original area to be
  79.          changed, and the last two are the new lower right  corner  of
  80.          the  area  in  its  new  dimensions.   The  upper left corner
  81.          remains in the same location.
  82.  
  83.          KC -  Followed  by  six  integers.   Borrowed  from  Wordstar
  84.          and BORLAND conventions, this is for COPY.   The  first  four
  85.          integers  specify  the  area  to  be copied, and the last two
  86.          mark the location of the upper left corner of the new object.
  87.  
  88.          KV  -  Followed by six  integers.  Again  from  Wordstar  and
  89.          BORLAND,  this  is  for  MOVE. Again six integers used in the
  90.          same manner as KC.
  91.  
  92.          KY - Followed by four integers.  An  ERASE  in  "Wordstarese"
  93.          These four numbers mark the rectangular region to be deleted.
  94.  
  95.          R  -  Followed  by  four integers.  This creates a rectangle.
  96.          The first two numbers mark the  upper  left  corner  and  the
  97.          last two mark the lower right corner.
  98.  
  99.          O - Followed immediately by a digit (no space between  them).
  100.          This  changes  the current color. Any object drawn will be in
  101.          this color until the color is changed  again.  In  monochrome
  102.          graphics  modes,  0 is black or the background color, and any
  103.          other number between 1 and 15 results in foreground or white.
  104.          In the 16-color modes:
  105.  
  106.                0 = BLACK
  107.                1 = MIDNIGHT BLUE
  108.                2 = TREE GREEN
  109.                3 = DARK CYAN
  110.                4 = CRIMSON
  111.                5 = PURPLE
  112.                6 = BROWN
  113.                7 = LIGHT GRAY
  114.                8 = DARK GRAY
  115.                9 = AVERAGE BLUE
  116.                10 = BRIGHT GREEN
  117.                11 = SKY BLUE
  118.                12 = BRIGHT RED
  119.                13 = MAGENTA
  120.                14 = YELLOW
  121.                15 = WHITE
  122.            (assuming there have been no 'n's in the file)
  123.  
  124.          In  256-color mode, the above list shows the first 16 colors,
  125.          beyond this, you are on your own with colors!
  126.  
  127.          n  - Followed immediately by 2 or 4 integers.  This indicates
  128.          a color palette change and only works in UNIVERSAL, EGA-HI or
  129.          the VGA video modes.  The first number is the color number to
  130.          change.  For instance, if the first number  is  3,  then  the
  131.          color  affected  will the the third one on the color menu. In
  132.          16-color modes, the next  number  indicates  then  new  value
  133.          (range  0-63)  for  the  color.   In  the 256-color modes the
  134.          second number (0-63) indicates the amount of  red,  the  next
  135.          number  is  for  green  and  the  last is for blue. These are
  136.          negative colors, oddly enough:  Green + red = yellow.  Notice
  137.          that the n is not capitalized.
  138.  
  139.          B - Followed immediately by a digit (no space between  them).
  140.          This  has  no  effect unless the graphics mode is CGA-HIGH or
  141.          CGA-LOW,  in which case it immediately changes the background
  142.          color.  You can choose any of the first 8 (0-7)  colors  from
  143.          the above listing for background color.
  144.  
  145.          C  -  Followed  by  three integers.  A circle.  The first two
  146.          integers mark the centerpoint location, and the last  is  the
  147.          radius  of the circle.  As with most objects, the circle will
  148.          be drawn in the current color and line thickness.
  149.  
  150.          E - Followed by six  integers.  An  ellipse.  The  first  two
  151.          integers  mark the centerpoint, the next two are the starting
  152.          and ending angles of the ellipse. A full ellipse starts at  0
  153.          degrees and ends at 360. 0 degrees is the 3 o'clock position,
  154.          High  Noon  is 90 degrees, 9 o'clock is 180, and 6 o'clock is
  155.          270. Therefore a partial ellipse, drawn from 45 to 90 degrees
  156.          would range from approximately 1:30 to noon of a clock  dial.
  157.          The last two digits in an ELLIPSE are the horizontal followed
  158.          by the vertical axes in pixels.
  159.  
  160.          F  -  Followed  by three integers. This fills a bordered area
  161.          with the currently selected color in the pattern specified by
  162.          the third number.  The color must be the same as the  border.
  163.          If  there  is  even  a one-pixel gap in the border, the color
  164.          will leak out and fill the whole picture.
  165.  
  166.          text/ - Followed immediately by five integers. The first two
  167.          integers  mark  the  position of the upper left corner of the
  168.          text block.  The third number selects the typeface  or  font.
  169.          The  last  two  integers  represent  the magnification of the
  170.          typeface. Of these last two, the first is for the  width  and
  171.          the  second is for height of the font.  The 'default' size of
  172.          most fonts is 4 wide and 4 high.  A  number  smaller  than  4
  173.          renders a narrower font and a larger number is wider. And, of
  174.          course,  if  the  last  number  is  larger,  the font will be
  175.          taller, but if it is a number smaller than 4, the  font  will
  176.          be small.
  177.              The  possible sizes range from 1 to 9.  If you try to use
  178.          a width or height  outside  of  this  range,  any  number  of
  179.          horrible things may happen to your presentation!
  180.              The  first two typefaces, BITMAP and TRIP, are built into
  181.          the program, but the others are kept on the disk in  external
  182.          files.   These  files  end with .CHR.  So, if you want to use
  183.          the SCRIPT font, for instance, you must supply  the  SCRI.CHR
  184.          file  along  with  your  picture files on every disk copy you
  185.          make.
  186.              The first typeface, BITMAP, is handled differently by the
  187.          program. Vertical  and  horizontal  dimensioning  is  handled
  188.          together,  you  cannot  specifically  control  the  width  or
  189.          height, but only the overall size.
  190.              Text is drawn in the currently selected color.  The  text
  191.          begins  on  the  line following "text/" and the five  numbers
  192.          and continues until a line is encountered which  starts  with
  193.          ~.  The  ~  must  be  in  the  first column of the first line
  194.          following a block of text, otherwise MSHOW  will  assume  the
  195.          following  lines  are  to  be displayed as text and will most
  196.          likely crash. So, as soon as MSHOW  encounters  a  line  that
  197.          starts  with  "text/" the lines following are considered text
  198.          and displayed verbatim until a line starting with ~ is found.
  199.          TEXT BLOCKS MUST BE FOLLOWED BY A LINE THAT  STARTS  WITH  ~.
  200.          You  can  edit  the  text  just  as  you would any ASCII text
  201.          document, keeping in mind that the size of the  block  cannot
  202.          exceed the room available in the picture.
  203.  
  204.          title/ - Followed by five integers.  The first  two  integers
  205.          mark  the  center  around  which the title will be displayed.
  206.          The  third  number  selects the typeface. And, as with text/,
  207.          the last two numbers control the size of the font.  The  line
  208.          following  "title/"  and the five numbers  is the title which
  209.          will be displayed verbatim.
  210.  
  211.          D - Followed immediately by one integer.  DELAY,  causes  the
  212.          program  to  freeze  for  the  amount of time in milliseconds
  213.          indicated by the  integer.   The  largest  value  allowed  is
  214.          approximately  65000  milliseconds.   If  a  longer  delay is
  215.          required, several delays can be used together. For example, a
  216.          two-and-a-half minute delay would look like this:
  217.  
  218.          D60000
  219.          D60000
  220.          D30000
  221.  
  222.          And  that's  all  the  codes  required  to  make   multimedia
  223.          presentations!
  224.  
  225.          These  are  fully at your disposal for editing with your text
  226.          editor or word processor. For instance, if you  have  made  a
  227.          picture  with  a  rectangle in it:
  228.  
  229.          R113 24 196 68
  230.  
  231.          but you wish the rectangle were a little more  to  the  left,
  232.          you could simply change it:
  233.  
  234.          R103 24 186 68
  235.  
  236.          Then rerun The Multimedia Workshop or MSHOW  and  check  your
  237.          change. In this illustration, your rectangle would have moved
  238.          10 pixels to the left.
  239.  
  240.          Lets say your rectangle was yellow,  but  you  wish  it  were
  241.          white. You could precede the line like this:
  242.  
  243.          015
  244.          R103 24 186 68
  245.  
  246.          No doubt you can see the incredible power in ASCII editing of
  247.          pictures!  You  can  fine  tune your graphics, sound effects,
  248.          animation timings, even correct typographical errors in  text
  249.          within pictures!
  250.  
  251.          There are some conventions that must be observed.  Make  sure
  252.          to use a single space between integers.  Make sure to use the
  253.          exact   same   spellings  and  capitalizations.  Make sure to
  254.          preserve blank lines where they exist in  the  picture  file.
  255.          For  instance,  after  a  series  of sounds, there must be at
  256.          least one blank line. Make sure to test your  pictures  after
  257.          you  have  made  changes.   And  most  of  all,  feel free to
  258.          experiment considerably.  With  practice,  you'll  understand
  259.          this  well  and  be  able  to  generate  very fine work, very
  260.          quickly!
  261.  
  262.          Since  all  the  picture  command  lines  start  in  the very
  263.          left-most column, you can temporarily remove an element  from
  264.          a  picture  by  simply typing a space or an * in front of the
  265.          line.  This causes it to move to the second column.   If  The
  266.          Multimedia Workshop or MSHOW.EXE finds a ' ' or an '*' in the
  267.          first  column  of  a  line, they ignore the whole rest of the
  268.          line, except within text blocks.
  269.  
  270.             This is good for troubleshooting a picture.  For instance,
  271.          let's say you have created a complicated picture, and in your
  272.          picture is an annoying line which runs diagonally through the
  273.          wrong place as annoyingly as a pipe wrench in  a  typewriter.
  274.          Try  to find the line. When you think you have it, put a * in
  275.          front of it, and check the picture. One line in your  picture
  276.          will  not be displayed.  If you put the * in the right place,
  277.          the diagonal line will be gone,  otherwise  some  other  line
  278.          will  be  missing.  Once  you  have  found  the right line to
  279.          delete, you can simply leave the * there or you can  actually
  280.          delete the line.
  281.  
  282.          If  you  use  a  text  editor  which runs TSR (Terminate Stay
  283.          Resident) such as Borland's Sidekick, you can do your editing
  284.          while The Multimedia Workshop remains  loaded  and  see  your
  285.          changes  almost  instantly.  The best way to do this seems to
  286.          be to select SEE from the control panel first, then  do  your
  287.          editing,  then  return to SEE, press [Enter] and then [Enter]
  288.          again to redraw the picture.  This is best because some TSR's
  289.          do funny things to the picture, especially if in VGA mode, or
  290.          they steal the mouse cursor and won't give it back! Note:  If
  291.          your  RAM space is limited, you'll sometimes have just enough
  292.          space for a small TSR and The Multimedia Workshop.  Kick  the
  293.          others out of your AUTOEXEC.BAT file. If still a problem, you
  294.          can  almost always switch between MSHOW.EXE and a TSR without
  295.          RAM problems.
  296.  
  297.  
  298.                                   VIDEO MODES
  299.  
  300.          You'll  notice that the first line in picture files is always
  301.          "mode"  followed  by  a  digit.  This is how MSHOW.EXE or The
  302.          Multimedia Workshop know which mode to use. The modes are:
  303.  
  304.             1 CGA-HIGH 2-color
  305.             2 CGA-LO 4-color
  306.             3 UNIVERSAL MODE 640 x 200 16-color (EGA-LO)
  307.             4 EGA-HIGH
  308.             5 HERCULES MONOCHROME
  309.             6 VGA-HIGH
  310.  
  311.          GUESS  WHAT?  You can fudge these modes.  For instance, Let's
  312.          pretend  you have a HERCULES graphics system, but you want to
  313.          create a presentation in UNIVERSAL mode so  that  the  widest
  314.          possible   audience  can  see  your  stuff.   The  Multimedia
  315.          Workshop  knows  that  all  you  have  is  HERCULES,  and  so
  316.          automatically  puts  a "mode5" at the start of every picture,
  317.          so it will run  at  the  best  possible  resolution  in  your
  318.          system,  and  not  confuse  you with 16-color menus you can't
  319.          use.
  320.  
  321.          But if you use a mode5 (Hercules) presentation in most  other
  322.          systems,  MSHOW.EXE  will  first display a warning that it is
  323.          the  wrong  graphics  mode,  then  translate  the   pictures.
  324.          Furthermore, Hercules allows 720 pixel-wide pictures, but the
  325.          other  graphics  modes  don't, so the right-hand side of your
  326.          presentations will be cut off for CGA and VGA users.
  327.  
  328.          So  here's  what you do: You start by changing the first line
  329.          in each picture from "mode5" to "mode3." Mode 3 is  UNIVERSAL
  330.          MODE.  It  will  still play on your HERCULES system, but will
  331.          now also work without  the  warning  on  all  other  standard
  332.          graphic  systems.  Then  you make your pictures to fit within
  333.          640 horizontal pixels and 200 vertical pixels. In other words
  334.          draw your pictures in the upper left portion of  your  screen
  335.          not exceeding coordinates 639 by 199.
  336.  
  337.          This  is  important.  When  you  play a picture in a mode for
  338.          which it was not designed, if the picture is larger than  the
  339.          graphics  mode  attempting  to  display  it,  the program may
  340.          crash. So, UNIVERSAL MODE pictures cannot exceed 639 x 199.
  341.  
  342.          NOTE:  Do  not fudge graphics modes if you have included .PCX
  343.          files, because they are usually not  transportable  from  one
  344.          type  of  graphics  card  to  another  (or  one  emulation to
  345.          another). In other words, you cannot end up with  a  Hercules
  346.          .PCX file working on a .CGA system.
  347.  
  348.          And last, to add colors, for those who can display them,  you
  349.          can use the picture file COLORS  to  see  a  chart  and  then
  350.          sprinkle  your  picture  files with "O"'s followed by numbers
  351.          for color changes. Getting the colors  right  is  tricky,  so
  352.          you  might  want  to  at  least  view  your presentation on a
  353.          borrowed computer which has color, to make sure it looks ok.
  354.  
  355.          A  little  inside  tip  for  professional-looking colorizing:
  356.          Stick to two or three  colors,  perhaps  text  in  sky  blue,
  357.          graphics in white, and arrows in red.
  358.  
  359.          _____________________________________________________________
  360.                                                         end of chapter
  361.  
  362.  
  363.  
  364.  
  365.